package com.rockcent.mall.lib.repository;

import com.rockcent.common.domain.enumclass.Whether;
import com.rockcent.mall.lib.domain.MarketMerchantCooperationMessage;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

/**
 * Created by oyhk on 14-6-22.
 *
 */
@Repository
public interface MarketMerchantCooperationMessageRepository extends JpaRepository<MarketMerchantCooperationMessage, Long>, JpaSpecificationExecutor {

    Page<MarketMerchantCooperationMessage> findByMerchantIdAndIsDeleteOrderByDateCreatedDesc(Long merchantId, Whether isDelete, Pageable pageable);
    MarketMerchantCooperationMessage findByIdAndMerchantId(Long id, Long merchantId);



}
